Learn R Programming

tolBasis (version 1.0)

Serie Arithmetic: Serie Arithmetic Operators

Description

Arithmetic operators for the Serie class.

Usage

"+"(s1,s2) "-"(s1,s2) "*"(s1,s2) "/"(s1,s2) "^"(s,n)

Arguments

s1, s2, s
Serie objects
n
a positive integer number

Value

Returns the Serie object resulting of the arithmetical operation.

See Also

See the class Serie.

Examples

Run this code
s1 <- Serie(rnorm(12), Monthly, Date(2015))
s2 <- Serie(rnorm(12), Monthly, Date(2015))
ss <- s1+s2
sd <- s1-s2
sp <- s1*s2
sq <- s1/s2
se <- s1^2

Run the code above in your browser using DataLab